Optimal. Leaf size=264 \[ \frac {2 \left (9 a^2 A+7 A b^2+14 a b B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {10 \left (9 b^2 B+11 a (2 A b+a B)\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{231 d}+\frac {10 \left (9 b^2 B+11 a (2 A b+a B)\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{231 d}+\frac {2 \left (9 a^2 A+7 A b^2+14 a b B\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {2 \left (9 b^2 B+11 a (2 A b+a B)\right ) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{77 d}+\frac {2 b (11 A b+13 a B) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{99 d}+\frac {2 b B \cos ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x)) \sin (c+d x)}{11 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.24, antiderivative size = 264, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3069, 3102,
2827, 2715, 2719, 2720} \begin {gather*} \frac {2 \left (9 a^2 A+14 a b B+7 A b^2\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {2 \left (9 a^2 A+14 a b B+7 A b^2\right ) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{45 d}+\frac {10 \left (11 a (a B+2 A b)+9 b^2 B\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{231 d}+\frac {2 \left (11 a (a B+2 A b)+9 b^2 B\right ) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{77 d}+\frac {10 \left (11 a (a B+2 A b)+9 b^2 B\right ) \sin (c+d x) \sqrt {\cos (c+d x)}}{231 d}+\frac {2 b (13 a B+11 A b) \sin (c+d x) \cos ^{\frac {7}{2}}(c+d x)}{99 d}+\frac {2 b B \sin (c+d x) \cos ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x))}{11 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2715
Rule 2719
Rule 2720
Rule 2827
Rule 3069
Rule 3102
Rubi steps
\begin {align*} \int \cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x))^2 (A+B \cos (c+d x)) \, dx &=\frac {2 b B \cos ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x)) \sin (c+d x)}{11 d}+\frac {2}{11} \int \cos ^{\frac {5}{2}}(c+d x) \left (\frac {1}{2} a (11 a A+7 b B)+\frac {1}{2} \left (9 b^2 B+11 a (2 A b+a B)\right ) \cos (c+d x)+\frac {1}{2} b (11 A b+13 a B) \cos ^2(c+d x)\right ) \, dx\\ &=\frac {2 b (11 A b+13 a B) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{99 d}+\frac {2 b B \cos ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x)) \sin (c+d x)}{11 d}+\frac {4}{99} \int \cos ^{\frac {5}{2}}(c+d x) \left (\frac {11}{4} \left (9 a^2 A+7 A b^2+14 a b B\right )+\frac {9}{4} \left (9 b^2 B+11 a (2 A b+a B)\right ) \cos (c+d x)\right ) \, dx\\ &=\frac {2 b (11 A b+13 a B) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{99 d}+\frac {2 b B \cos ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x)) \sin (c+d x)}{11 d}+\frac {1}{9} \left (9 a^2 A+7 A b^2+14 a b B\right ) \int \cos ^{\frac {5}{2}}(c+d x) \, dx+\frac {1}{11} \left (9 b^2 B+11 a (2 A b+a B)\right ) \int \cos ^{\frac {7}{2}}(c+d x) \, dx\\ &=\frac {2 \left (9 a^2 A+7 A b^2+14 a b B\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {2 \left (9 b^2 B+11 a (2 A b+a B)\right ) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{77 d}+\frac {2 b (11 A b+13 a B) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{99 d}+\frac {2 b B \cos ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x)) \sin (c+d x)}{11 d}+\frac {1}{15} \left (9 a^2 A+7 A b^2+14 a b B\right ) \int \sqrt {\cos (c+d x)} \, dx+\frac {1}{77} \left (5 \left (9 b^2 B+11 a (2 A b+a B)\right )\right ) \int \cos ^{\frac {3}{2}}(c+d x) \, dx\\ &=\frac {2 \left (9 a^2 A+7 A b^2+14 a b B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {10 \left (9 b^2 B+11 a (2 A b+a B)\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{231 d}+\frac {2 \left (9 a^2 A+7 A b^2+14 a b B\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {2 \left (9 b^2 B+11 a (2 A b+a B)\right ) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{77 d}+\frac {2 b (11 A b+13 a B) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{99 d}+\frac {2 b B \cos ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x)) \sin (c+d x)}{11 d}+\frac {1}{231} \left (5 \left (9 b^2 B+11 a (2 A b+a B)\right )\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=\frac {2 \left (9 a^2 A+7 A b^2+14 a b B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {10 \left (9 b^2 B+11 a (2 A b+a B)\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{231 d}+\frac {10 \left (9 b^2 B+11 a (2 A b+a B)\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{231 d}+\frac {2 \left (9 a^2 A+7 A b^2+14 a b B\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {2 \left (9 b^2 B+11 a (2 A b+a B)\right ) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{77 d}+\frac {2 b (11 A b+13 a B) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{99 d}+\frac {2 b B \cos ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x)) \sin (c+d x)}{11 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.84, size = 196, normalized size = 0.74 \begin {gather*} \frac {3696 \left (9 a^2 A+7 A b^2+14 a b B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+1200 \left (22 a A b+11 a^2 B+9 b^2 B\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )+2 \sqrt {\cos (c+d x)} \left (154 \left (36 a^2 A+43 A b^2+86 a b B\right ) \cos (c+d x)+180 \left (22 a A b+11 a^2 B+16 b^2 B\right ) \cos (2 (c+d x))+770 b (A b+2 a B) \cos (3 (c+d x))+15 \left (1144 a A b+572 a^2 B+531 b^2 B+21 b^2 B \cos (4 (c+d x))\right )\right ) \sin (c+d x)}{27720 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(665\) vs.
\(2(292)=584\).
time = 0.33, size = 666, normalized size = 2.52
method | result | size |
default | \(-\frac {2 \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (20160 B \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{2}+\left (-12320 A \,b^{2}-24640 B a b -50400 B \,b^{2}\right ) \left (\sin ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (15840 A a b +24640 A \,b^{2}+7920 B \,a^{2}+49280 B a b +56880 B \,b^{2}\right ) \left (\sin ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-5544 a^{2} A -23760 A a b -22792 A \,b^{2}-11880 B \,a^{2}-45584 B a b -34920 B \,b^{2}\right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (5544 a^{2} A +18480 A a b +10472 A \,b^{2}+9240 B \,a^{2}+20944 B a b +13860 B \,b^{2}\right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-1386 a^{2} A -5280 A a b -1848 A \,b^{2}-2640 B \,a^{2}-3696 B a b -2790 B \,b^{2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+1650 A a b \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-2079 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a^{2}-1617 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) b^{2}+825 B \,a^{2} \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+675 B \,b^{2} \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-3234 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a b \right )}{3465 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) | \(666\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.15, size = 299, normalized size = 1.13 \begin {gather*} \frac {2 \, {\left (315 \, B b^{2} \cos \left (d x + c\right )^{4} + 385 \, {\left (2 \, B a b + A b^{2}\right )} \cos \left (d x + c\right )^{3} + 825 \, B a^{2} + 1650 \, A a b + 675 \, B b^{2} + 45 \, {\left (11 \, B a^{2} + 22 \, A a b + 9 \, B b^{2}\right )} \cos \left (d x + c\right )^{2} + 77 \, {\left (9 \, A a^{2} + 14 \, B a b + 7 \, A b^{2}\right )} \cos \left (d x + c\right )\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 75 \, \sqrt {2} {\left (11 i \, B a^{2} + 22 i \, A a b + 9 i \, B b^{2}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 75 \, \sqrt {2} {\left (-11 i \, B a^{2} - 22 i \, A a b - 9 i \, B b^{2}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 231 \, \sqrt {2} {\left (-9 i \, A a^{2} - 14 i \, B a b - 7 i \, A b^{2}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 231 \, \sqrt {2} {\left (9 i \, A a^{2} + 14 i \, B a b + 7 i \, A b^{2}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{3465 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.53, size = 275, normalized size = 1.04 \begin {gather*} -\frac {2\,A\,a^2\,{\cos \left (c+d\,x\right )}^{7/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {7}{4};\ \frac {11}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{7\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,B\,a^2\,{\cos \left (c+d\,x\right )}^{9/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {9}{4};\ \frac {13}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{9\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,A\,b^2\,{\cos \left (c+d\,x\right )}^{11/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {11}{4};\ \frac {15}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{11\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,B\,b^2\,{\cos \left (c+d\,x\right )}^{13/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {13}{4};\ \frac {17}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{13\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {4\,A\,a\,b\,{\cos \left (c+d\,x\right )}^{9/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {9}{4};\ \frac {13}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{9\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {4\,B\,a\,b\,{\cos \left (c+d\,x\right )}^{11/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {11}{4};\ \frac {15}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{11\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________